import 'package:flutter/material.dart';
class TopStack extends StatelessWidget {
  List<Widget> children;
  TopStack({this.children});
  @override
  Widget build(BuildContext context) {
    return   Container(
      height: 160,
      child: Stack(
        alignment: Alignment.center,
        children: [
          Positioned(
              left: 0,
              right: 0,
              top: 0,
              child: Container(
                height: 50,
                width: MediaQuery.of(context).size.width,
                color: Colors.blueAccent[400],
              )),
          Positioned(
              left: 15,
              right: 15,
              top: 10,
              child: Container(
                padding: EdgeInsets.fromLTRB(15,20,15,8),
                decoration: BoxDecoration(
                    color: Colors.white,
                    borderRadius: new BorderRadius.circular(4.0),
                    boxShadow: [
                      BoxShadow(
                          blurRadius: 2.0,
                          spreadRadius: 2.0,
                          color: Colors.black.withOpacity(0.1),
                          offset: Offset(1.0, 1.0))
                    ]),
                child: Row(
                  mainAxisAlignment: MainAxisAlignment.start,
                  crossAxisAlignment: CrossAxisAlignment.start,
                  children: children,
                ),
              )),
        ],
      ),
    );
  }
}
